﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SMS.Core.Model
{
    [Serializable]
    public class LoginException : Exception
    {
        private string username;
        private string pass_md5;

        public LoginException() { }

        public LoginException(string username)
            : base("The username is invalid.")
        {
            this.username = username;
            this.pass_md5 = null;
        }

        public LoginException(string username, string pass_md5)
            : base("The username/password combination is invalid.") 
        {
            this.username = username;
            this.pass_md5 = pass_md5;
        }

        
        public LoginException(string username, string pass_md5, 
            Exception innerException)
            : base("The username/password combination is invalid.", innerException)
        { 
            this.username = username;
            this.pass_md5 = pass_md5;
        }

        public String Username
        {
            get { return username; }
        }

        public String EncryptedPassword
        {
            get { return pass_md5; }
        }
    }
}
